home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
eflibpt4.zip
/
DEMO
/
SCREEN
/
WRITE3.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1996-07-21
|
1KB
|
34 lines
{ Borland Pascal Extended Function Library - EFLIB (C) Johan Larsson, 1996
Demonstration; screen write #3 - diagonal line drawing
EFLIB IS PROTECTED BY THE COPYRIGHT LAW AND MAY NOT BE COPIED, SOLD OR
MANIPULATED. FOR MORE INFORMATION, SEE PROGRAM MANUAL! THIS DEMONSTRAT-
ION PROGRAM MAY FREELY BE USED AND DISTRIBUTED. }
uses EFLIBDEF, EFLIBSCR;
const Laps = 1; MaximumRotation : word = 100;
var Count, Index : word; Rotation : real;
begin
{ Clear the screen }
Screen.Clear;
for Count := 1 to Laps do begin
for Index := 1 to MaximumRotation do begin
Rotation := (2 * Pi / MaximumRotation) * Index;
{ Draw a line }
Screen.DrawLine (40, 12, Round(40 + 39 * Sin (Rotation)), Round(12 + 11 * Cos (Rotation)), #219, Random(16));
end;
{ Change number of rotations }
MaximumRotation := MaximumRotation div 3;
for Index := MaximumRotation downto 1 do begin
Rotation := (2 * Pi / MaximumRotation) * Index;
{ Draw a line }
Screen.DrawLine (40, 12, Round(40 + 14 * Sin (Rotation)), Round(12 + 7 * Cos (Rotation)), #176, Random(16));
end;
end;
end.